package com.tbit.uqbike.enums;

import java.util.Objects;

public enum ValidEnum {
    NOT_VALID(0,"无效"),
    VALID(1,"有效"),
    CHECKING(2,"审核中"),
    ;


    private Integer status;

    private String name;

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    ValidEnum(Integer status, String name) {
        this.status = status;
        this.name = name;
    }

    public static String getStatusName(Integer status){
        for (ValidEnum value : ValidEnum.values()) {
            if (Objects.equals(value.getStatus(),status)){
                return value.getName();
            }
        }
        return "审核中";
    }
}
